import StatusEnum from "@/enums/StatusEnum";
import { list } from '/src/api/baseInfo/dept'

/**
 * @param label 表头
 * @param prop 字段名
 * @param isSearch 是否筛选项
 * @type {[{isSearch: boolean, prop: string, label: string},{isSearch: boolean, prop: string, label: string},{isSearch: boolean, prop: string, label: string},{isSearch: boolean, prop: string, label: string, enum: {0: string, 1: string, 2: string}}]}
 */
const tableColumn = [{
  label: "ID",
  prop: "id",
  isSearch: false,
  isTable: true
}, {
  label: "科室名称",
  prop: "name",
  isSearch: true,
  isTable: true,
  isForm: true,
  formType: "input",
  required: true,
  min: 0,
  max: 50
}, {
  label: "父级科室",
  prop: "parent_id",
  isSearch: false,
  isTable: false,
  isForm: true,
  formType: "select",
  asyncSelDataApi: list,
  asyncSelData: []
}, {
  label: "科室权重",
  prop: "sort",
  isSearch: false,
  isTable: true,
  isForm: true,
  formType: "number",
  required: true,
  min: 1,
  max: 1000
}, {
  label: "状态",
  prop: "status",
  isSearch: true,
  isForm: true,
  formType: "radio",
  defaultValue: 0,
  enum: StatusEnum
}, {
  label: "备注",
  prop: "remark",
  isForm: true,
  formType: "textarea",
  min: 0,
  max: 500
}]
const tableConfig = {
  buttons: ["view", "edit", "status"]
}
const pageConfig= {
  small: false,
  disabled: false,
  background: false,
}

export { tableColumn, tableConfig, pageConfig };
